<template>
  <div>
    <h1>Welcome, {{ username }}!</h1>
  </div>
</template>

<script>
export default {
  computed: {
    username() {
      return localStorage.getItem('username'); // 从 localStorage 中获取用户名
    }
  }
};
</script>